Cancel invoice

We booked a invoice in accounts payable module with match receipt option. Now we want to cancel the invoice, but the system show that "APP-SQLAP-97150; you cannot cancel this invoice because the cancellation would reduce quantity or amount billed for one or more purchase order to be less than zero.

Have u validated the invoice

Have u validated the invoice ? First reverse the distribution and then try to cancel